package leetcode.code322;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution322 implements IDebug {

	public abstract int coinChange(int[] coins, int amount);

	@Override
	public void debug1() {
		String str = "[1,2,5]";
		int amount = 11;
		int e = 3;
		debug(str, amount, e);
	}

	private void debug(String str, int amount, int e) {
		int[] coins = HelpDebug.str2array3(str);
		int r = this.coinChange(coins, amount);
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug2() {
		String str = "[2]";
		int amount = 3;
		int e = -1;
		debug(str, amount, e);
	}

	@Override
	public void debug3() {
		String str = "[1]";
		int amount = 0;
		int e = 0;
		debug(str, amount, e);
	}

	@Override
	public void debug4() {
		String str = "[1]";
		int amount = 1;
		int e = 1;
		debug(str, amount, e);
	}

	public void debug5() {
		String str = "[1]";
		int amount = 2;
		int e = 2;
		debug(str, amount, e);
	}

	public void debug6() {
		String str = "[3,4,5]";
		int amount = 7;
		int e = 2;
		debug(str, amount, e);
	}
	public void debug7() {
		String str = "[186,419,83,408]";
		int amount = 6249;
		int e = 20;
		debug(str, amount, e);
	}

	public void debug8() {
		String str = "[397,417,24,44,235]";
		int amount = 3383;
		int e = 13;
		debug(str, amount, e);
	}

}
